﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Sealight.Core.DataAdapter;
using Sealight.API.Ioc;
using Sealight.CoreAPI;

namespace Sealight.UI.WebUI.Services
{
    public class TopicService
    {
        public static IList<topic> GetTopic()
        {
            var svc = IocContainer.Container().Resolve<ITopicService>();
            return svc.GetAll();
        }

        public static topic GetTopicById(Guid id)
        {
            var svc = IocContainer.Container().Resolve<ITopicService>();
            return svc.GetById(id);
        }

        public static topic_localized GetTopicLocalizedById(Guid id)
        {
            var svc = IocContainer.Container().Resolve<ITopicService>();
            return svc.GetTopicLocalizedById(id);
        }
        public static topic_localized SaveOrUpdateTopicLocalized(topic_localized data)
        {
            var svc = IocContainer.Container().Resolve<ITopicService>();
            return svc.SaveOrUpdateTopicLocalized(data);
        }

        public static topic_localized GetTopicLocalized(Guid topicId, Guid languageId)
        {
            var svc = IocContainer.Container().Resolve<ITopicService>();
            return svc.GetTopicLocalized(topicId, languageId);            
        }
    }
}